<template>
<div>
<el-menu :default-active="this.$route.path" router mode="horizontal">
    <el-menu-item v-for="(item,i) in navList" :key="i" :index="item.name">
        {{ item.navItem }}
    </el-menu-item>
</el-menu>
<router-view></router-view>
</div>
</template>

<script>
  export default {
    data() {
      return {
        navList:[
            {name:'/fabu',navItem:'发布大厅'},
            {name:'/help',navItem:'帮助大厅'},
            {name:'/needhelp',navItem:'我的求助'},
            {name:'/myhelp',navItem:'我的帮助'},
            {name:'/geren',navItem:'个人中心'},
            {name:'/manageUsers',navItem:'用户管理'}
        ]
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>

<style scoped>
</style>